<template>
    <div style="background-color: hotpink;">
        <button @click="show=!show">大哥!!!!!!!</button>
        <p v-show="show">大哥说过说(将要接受父组件传过来的数据):{{ toSon }}</p>
        <p v-show="show">红莲螺岩!!!!!!!!
            <button @click="handle()">旋转吧</button>
        </p>
       
        <button @click="show1=!show1">倾听你的哀鸣吧</button><br>
       <span :style="{fontSize:getWid}" v-show="show1"> 奶奶说过：我乃行天之道，总司一切之人</span>
       <hr>
        <h2>奶奶又说过：{{receiveMsg}}</h2>
    </div>
</template>

<script>
export default {
    props:['toSon','wid'],
    data() {
        return {
            show:false,
            score:'红莲团!!!!!',
            show1:false,
            message:''
        }
    },
    methods: {
        handle(){
            this.$emit('score',this.score)
        },
        receiveMessage(message){
            this.receiveMsg=message
        }
    },
    computed:{
        getWid(){
            return this.wid+'px'
           
        }
    },  
}
</script>